package com.lagou.homework02;

/**
 * 上网套餐类
 * 特征：上网流量、每月资费
 * 行为：显示所有套餐信息
 */
public class NetPackage extends MobilePackage implements NetServicesInterface{
    private int netTraffic;

    public NetPackage(String monthlyCost, int netTraffic) {
        super(monthlyCost);
        setNetTraffic(netTraffic);
    }

    public NetPackage() {

    }

    public int getNetTraffic() {
        return netTraffic;
    }

    public void setNetTraffic(int netTraffic) {
        this.netTraffic = netTraffic;
    }

    @Override
    public void show() {
        System.out.println("套餐信息为：上网流量：" + getNetTraffic() + "M , 每月资费: " + super.getMonthlyCost());
    }

    @Override
    public void test(int netTraffic, String cardType) {
        System.out.println("这是上网服务接口中抽象方法的重写！");
    }
}
